package com.lanmao.mall.service.impl;

import com.lanmao.mall.converter.OrderConverter;
import com.lanmao.mall.entity.Order;
import com.lanmao.mall.mapper.OrderMapper;
import com.lanmao.mall.service.OrderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lanmao.mall.vo.OrderVO;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 订单 服务实现类
 * </p>
 *
 * @author lanmao
 * @since 2023-11-25
 */
@Service
@RequiredArgsConstructor
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements OrderService {
    private final OrderConverter orderConverter;

    @Override
    public List<OrderVO> getList() {
        List<Order> orderList = baseMapper.selectList(null);
        return orderConverter.entity2Vos(orderList);

    }
}
